package com.bharatonjava.swift.web.converters;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.bharatonjava.swift.domain.Role;

public class RoleConverter implements Converter{

	private static final Log log = LogFactory.getLog(RoleConverter.class);
	
	@Override
	public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String arg1) {
		Role role = new Role();
		log.info("111111111111111111 : " + arg1);
		return null;
	}

	@Override
	public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object object) {
		Role role = (Role) object;
		log.info("22222222222222222 : " + role);
		return role.getRoleName();
	}
	
	

}
